﻿using System.Windows.Forms;

namespace YanZhiwei.DotNet2.Utilities.WinForm
{
    public static class RadioButtonHelper
    {
        #region 设置RadioButton是否选中【线程安全】
        /// <summary>
        /// 设置RadioButton是否选中【线程安全】
        /// </summary>
        /// <param name="rb">RadioButton</param>
        /// <param name="check">是否选中</param>
        public static void OpRadioButtonTF(this RadioButton rb, bool check)
        {
            rb.UIThread((MethodInvoker)delegate
            {
                rb.Checked = check;
            });
        }
        #endregion 
    }
}
